
using System.Web.UI.HtmlControls;
using System;
using System.Configuration;
using System.Drawing;
using System.Data;
using System.Web.UI.WebControls;
using Microsoft.VisualBasic;
using System.Collections;
using System.Web.UI;
using System.Web;


using System.Resources;
using System.Xml;
//using com.ddsc.database;
using DDSC.OracleADO;
using com.ddsc.common;

//VER 1.1   20080508  EmilyLi   P3108M0374  新增廠商類別 EIC
//0002 20111124, WALTER P3511M0179-B2B平台廠商使用銷售庫存量線上查詢,開放報表給前台列印


namespace smasb2b
{
    public class left : System.Web.UI.UserControl
    {

        #region  Web Form 設計工具產生的程式碼

        //此為 Web Form 設計工具所需的呼叫。
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {

        }
        protected System.Web.UI.HtmlControls.HtmlInputImage btnLogin;
        protected ddscControlLibrary.InputBoxCtrl txtVENDER_ID;
        protected ddscControlLibrary.InputBoxCtrl txtPASSWORD;
        protected System.Web.UI.HtmlControls.HtmlImage IMG1;
        protected System.Web.UI.WebControls.Label lblMSG002;
        protected System.Web.UI.WebControls.Label lblMSG003;
        protected System.Web.UI.WebControls.Label lblQUERYPW;
        protected System.Web.UI.HtmlControls.HtmlImage IMG2;
        protected System.Web.UI.WebControls.Label lblVENDOR_NAME;
        protected System.Web.UI.WebControls.Label lblVENDOR_TYPE;
        protected System.Web.UI.HtmlControls.HtmlTable left_Renamed;
        protected System.Web.UI.HtmlControls.HtmlTable menu;
        protected System.Web.UI.HtmlControls.HtmlTable menu_zoon;
        protected System.Web.UI.HtmlControls.HtmlImage IMG3;
        protected System.Web.UI.HtmlControls.HtmlImage IMG4;
        protected ddscControlLibrary.InputBoxCtrl txtVENDOR_NAME;
        protected ddscControlLibrary.InputBoxCtrl txtVENDOR_TYPE;
        protected System.Web.UI.WebControls.Label lblNOTICE_LIST;
        protected System.Web.UI.WebControls.Label lblPROCURE_LIST;
        protected System.Web.UI.WebControls.Label lblDATA_CHANGE;
        protected System.Web.UI.HtmlControls.HtmlInputButton btnSignOut;
        protected System.Web.UI.WebControls.Label lblVNDW0030;
        protected System.Web.UI.WebControls.Label lblVNDW0020;
        protected System.Web.UI.HtmlControls.HtmlImage Img5;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hidLogin_Flag;

        //注意: 下列預留位置宣告是 Web Form 設計工具需要的項目。
        //請勿刪除或移動它。
        private System.Object designerPlaceholderDeclaration;

        private void Page_Init(System.Object sender, System.EventArgs e)
        {
            //CODEGEN: 此為 Web Form 設計工具所需的方法呼叫
            //請勿使用程式碼編輯器進行修改。
            InitializeComponent();
        }

        #endregion

        //在這裡放置使用者程式碼以初始化網頁
        public string pGUID;
        BasePage BasePage = new BasePage();
        ResourceManager rm;
        VENDOR OnUser;

        private void Page_Load(System.Object sender, System.EventArgs e)
        {
            pGUID = Guid.NewGuid().ToString();
            OnUser = BasePage.GetLoginUser();
            rm = BasePage.GetResourceManager();
            if (!(OnUser == null))
            {
                if (OnUser.IsAutouth)
                {
                    if (OnUser.PW_STATUS == "0")
                    {
                        OnUser.PW_STATUS = "1";
                        Session["LoginUser"] = OnUser;
                        BasePage.showException(this.Page, rm.GetString("MSG014"));
                    }
                    string NAME = "";
                    if (OnUser.NAME == "")
                    {
                        NAME = OnUser.ENGLISH_NAME;
                    }
                    else
                    {
                        NAME = OnUser.NAME;
                    }
                    txtVENDOR_NAME.Text = NAME;
                    txtVENDOR_TYPE.Text = rm.GetString(OnUser.VENDOR_TYPE);
                    left_Renamed.Visible = false;
                    menu_zoon.Visible = true;
                    //If OnUser.VENDOR_STATUS = "9" Then
                    DisplayMenu();
                    //End If
                }
                else
                {
                    txtVENDER_ID.EnableView = true;
                    txtPASSWORD.EnableView = true;
                    left_Renamed.Visible = true;
                    menu_zoon.Visible = false;
                }
            }
            else
            {
                //<!-- 'Update By Ben 2008/4/21 S8970025 -->
                if (hidLogin_Flag.Value == "OK")
                {
                    FunctionHandler FunctionHandler = new FunctionHandler();
                    txtPASSWORD.Text = FunctionHandler.Decrypt(txtPASSWORD.Text);

                    System.Web.UI.ImageClickEventArgs ee = default(System.Web.UI.ImageClickEventArgs);
                    btnLogin_ServerClick(sender, ee);

                }
                left_Renamed.Visible = true;
                menu_zoon.Visible = false;
            }
        }


        public bool CheckPWD3Months()
		{
            bool result = default(bool);
			DataSet ds = default(DataSet);
			dbAccess dba = new dbAccess();
            ArrayList m_arrParam = new ArrayList();
			string SqlCommandText = "";
			//Dim LoginUser As VENDOR = BasePage.CreateVENDOR(Me.txtVENDER_ID.Text.Replace("'", "''").Trim())
			//Dim FunctionHandler As FunctionHandler = New FunctionHandler
			
			//Dim password As String = FunctionHandler.Decrypt(LoginUser.PASSWORD.ToString)
			string syspassword = System.Configuration.ConfigurationSettings.AppSettings["SYSPW"];

            //Tony : 1.修改SQL語法使用參數，不組字串
			//SqlCommandText = "SELECT DECODE(TRUNC(SYSDATE - TO_DATE(UPD_DATE,\'YYYY/MM/DD\')),\'\',999,TRUNC(SYSDATE - TO_DATE(UPD_DATE,\'YYYY/MM/DD\'))) DAYS,VENDOR_PWD  from VND_VENDOR_AUTHORITY WHERE VENDOR_NO=\'" + this.txtVENDER_ID.Text.Replace("\'", "\'\'").Trim() + "\'";
            SqlCommandText = "SELECT DECODE(TRUNC(SYSDATE - TO_DATE(UPD_DATE,\'YYYY/MM/DD\')),\'\',999,TRUNC(SYSDATE - TO_DATE(UPD_DATE,\'YYYY/MM/DD\'))) DAYS,VENDOR_PWD  from VND_VENDOR_AUTHORITY WHERE VENDOR_NO=:txtVENDER_ID";

            //Tony : 2.設定動態參數物件
            m_arrParam.Add(dba.GetOracleParam(":txtVENDER_ID",  this.txtVENDER_ID.Text.Replace("\'", "\'\'").Trim()));

            //執行資料庫語法
            //Tony : 3.修改執行方法Overload
			//ds = dba.runExecuteQuery("VND_VENDOR_AUTHORITY", SqlCommandText);
            ds = dba.runExecuteQuery("VND_VENDOR_AUTHORITY", SqlCommandText, m_arrParam);
			
			if (!(ds == null) && ds.Tables["info"].Rows[0]["ReturnCode"] != "100" && ds.Tables["info"].Rows[0]["ReturnCode"] != "999")
			{
				int RETURN_DAY = System.Convert.ToInt32(ds.Tables[1].Rows[0]["DAYS"]);
				//Dim PWD As String = FunctionHandler.Decrypt(ds.Tables(1).Rows(0)("VENDOR_PWD").ToString())
				//管理者專用
				if (this.txtPASSWORD.Text == syspassword)
				{
					//RETURN_DAY = 0
				}
				
				//ADD By JoeChou TSA_CUSTOM 不進行判斷 2013/01/07 ,  解決 TSA_CUSTOM 不定時帳號資料被刪除之Bug
				if (this.txtVENDER_ID.Text.Replace("\'", "\'\'").Trim() != "TSA_CUSTOM")
				{
					if (RETURN_DAY > 90)
					{
						result= true;
					}
					else
					{
						result= false;
					}
				}
				else
				{
					result= false;
				}
			}

            return result;
			
		}

        public void btnLogin_ServerClick(System.Object sender, System.Web.UI.ImageClickEventArgs e)
        {

            VENDOR LoginUser = BasePage.CreateVENDOR(System.Convert.ToString(this.txtVENDER_ID.Text.Replace("\'", "\'\'").Trim()));
            FunctionHandler FunctionHandler = new FunctionHandler();

            try
            {
                if (LoginUser.IsAutouth)
                {


                    string password = FunctionHandler.Decrypt(LoginUser.PASSWORD.ToString());
                    string syspassword = System.Configuration.ConfigurationSettings.AppSettings["SYSPW"];
                    //UPDATE BY TITAN AT 2006/06/29 FOR ADD SYSPW SET WEB.CONFIG
                    if (this.txtPASSWORD.Text == syspassword)
                    {
                        LoginUser.IsAutouth = true;
                        LoginUser.PW_STATUS = "1";
                    }
                    else if (this.txtPASSWORD.Text != password || txtPASSWORD.Text.Trim() == "")
                    {
                        LoginUser.IsAutouth = false;
                    }
                    //20111201,add,多密碼3個月更新檢核
                    if (LoginUser.IsAutouth)
                    {
                        if (CheckPWD3Months())
                        {
                            Response.Redirect("/smasb2b/VND/AUTO_CHG_PWD.aspx?VENDOR_NO=" + LoginUser.VENDOR_NO + "&PWD=" + LoginUser.PASSWORD.ToString());
                        }

                    }

                    //-end
                    if (LoginUser.IsAutouth)
                    {
                        Session["LoginUser"] = LoginUser;
                        System.Web.Security.FormsAuthentication.RedirectFromLoginPage(LoginUser.VENDOR_NO, false);
                        Response.Redirect("~/MainFrame.aspx");
                    }
                    else
                    {
                        BasePage.showException(this.Page, rm.GetString("MSG013"));
                    }

                }
                else
                {
                    BasePage.showException(this.Page, rm.GetString("MSG015"));
                }

            }
            catch (Exception ex)
            {
                BasePage.showException(ex.Message);
            }
            finally
            {
                rm = null;
                BasePage.Dispose();
                LoginUser = null;
            }
        }

        public void btnSignOut_ServerClick(System.Object sender, System.EventArgs e)
        {
            System.Web.Security.FormsAuthentication.SignOut();
            Session["LoginUser"] = null;
            Response.Redirect("~/default.aspx");
        }

        //呈現選單程式
        public void DisplayMenu()
        {
            string XMLQueryPath = "/smasb2b/menu.xml";
            XmlDocument XmlDoc = new XmlDocument();
            string XPath = "//menu[@name=\'\']";
            string ID = "";
            //2010/08/12 added by Ray 原特定廠商判斷邏輯放至共同變數
            bool bNotSpecifyVendor = OnUser.VENDOR_KIND != "CTM"
                && OnUser.VENDOR_KIND != "ESC"
                && OnUser.VENDOR_KIND != "EIC"
                && OnUser.VENDOR_KIND != "TSA";
            //設定查詢XML 語法
            if (bNotSpecifyVendor) //VER 1.1   20080508  EmilyLi   P3108M0374  新增廠商類別 EIC
            {
                ID = "INI";
            }
            else
            {
                ID = OnUser.VENDOR_KIND;
            }
            XPath = string.Format("//menu[@name=\'{0}\']/link", ID);
            //取得畫面設定內容
            XmlNode ChildNode = default(XmlNode);
            HtmlTableRow dr;
            //載入畫面格式XML
            XmlDoc.Load(Server.MapPath(XMLQueryPath));
            XmlNodeList NodeList = XmlDoc.SelectNodes(XPath);
            HtmlTableCell td = default(HtmlTableCell);
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            string strLink = string.Empty;



            //ADD BY JOE 2010/11/11  - 長立委銷代購案 - 新增高雄海關 ,
            //                         多傳參數 CUSTOM_CHK 至後台以用來判斷是那各站別的海關
            //MODI BY JOE 2010/11/26 - 新增海關使用帳號 CUSTOM1
            string CUSTOM = "";
            //20110113 JAFF MARK 因要將sb.Remove移到下方，為了清空每個不同NODE的資料
            //sb.Remove(0, sb.Length)
            //If (OnUser.VENDOR_NO = "CUSTOM" Or OnUser.VENDOR_NO = "CUSTOM1") And ID = "CTM" Then
            //    ' TTT = 桃園海關
            //    sb.AppendFormat("&{0}={1}", "CUSTOM_CHK", "TTT")
            //ElseIf OnUser.VENDOR_NO = "CUSTOM_KHH" And ID = "CTM" Then
            //    ' KHH = 高雄海關
            //    sb.AppendFormat("&{0}={1}", "CUSTOM_CHK", "KHH")
            //End If
            if ((OnUser.VENDOR_NO == "CUSTOM" || OnUser.VENDOR_NO == "CUSTOM1") && ID == "CTM")
            {
                // TTT = 桃園海關
                CUSTOM = "&CUSTOM_CHK=TTT";
            }
            else if (OnUser.VENDOR_NO == "CUSTOM_KHH" && ID == "CTM")
            {
                // KHH = 高雄海關
                CUSTOM = "&CUSTOM_CHK=KHH";
            }
            //2010/11/11


            //2011/11/24,ADD,BY WALTER,P3511M0179-B2B平台廠商使用銷售庫存量線上查詢,開放報表給前台列印
            CUSTOM = CUSTOM + "&VENDOR_NO=" + OnUser.VENDOR_NO;
            //--END


            foreach (XmlNode tempLoopVar_ChildNode in NodeList)
            {
                ChildNode = tempLoopVar_ChildNode;
                //20110113 JAFF ADD
                sb.Remove(0, sb.Length);
                sb.Append(CUSTOM);

                td = new HtmlTableCell();
                foreach (XmlAttribute attr in ChildNode.Attributes)
                {

                    switch (attr.Name.ToLower())
                    {
                        case "name":
                        case "url":
                        case "imageurl":
                        case "target":
                            break;
                        //ignore
                        default:
                            sb.AppendFormat("&{0}={1}", attr.Name, Server.UrlEncode(attr.Value));
                            break;
                    }
                }

                if (bNotSpecifyVendor) //VER 1.1   20080508  EmilyLi   P3108M0374  新增廠商類別 EIC
                {
                    // Clare mark for IE7 test
                    //      menu.Rows(menu.Rows.Count - 1).Cells(menu.Rows(menu.Rows.Count - 1).Cells.Count - 1).InnerHtml() = String.Format("<img src='{0}'>  <base target='{3}'>  <a href='{1}?TYPE=b2b&GUID={2}'>  {4}</a>", ChildNode.Attributes("imageUrl").Value, ChildNode.Attributes("url").Value, Guid.NewGuid.ToString(), ChildNode.Attributes("target").Value, rm.GetString(ChildNode.Attributes("name").Value))
                    if (OnUser.B2B_FLAG_STATUS == "9" || OnUser.VENDOR_STATUS == "9")
                    {
                        if (ChildNode.Attributes["name"].Value == "DOWNLOADAP")
                        {
                            menu.Rows.Add(new HtmlTableRow());
                            menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                            menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  <a href= \"javascript: DownLoadFile(\'{1}?VENDOR_TYPE={2}{4}\')\" >  {3}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, OnUser.VENDOR_TYPE, rm.GetString(ChildNode.Attributes["name"].Value), sb.ToString());
                        }
                        else if (ChildNode.Attributes["name"].Value == "DOWNLOADCONTENTSOP")
                        {
                            menu.Rows.Add(new HtmlTableRow());
                            menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                            menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  <a href= \"javascript: DownLoadFile(\'{1}?VENDOR_TYPE={2}{4}\')\" >  {3}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, OnUser.VENDOR_TYPE, rm.GetString(System.Convert.ToString(ChildNode.Attributes["name"].Value)), sb.ToString());
                        }
                        else
                        {
                            strLink = "<a href=\'{1}?PROG_ID={2}&GUID={5}{6}\'>";
                            if (ChildNode.Attributes["target"].Value.ToLower() == "_blank")
                            {
                                //P3511M0179-B2B平台廠商使用銷售庫存量線上查詢,開放報表給前台列印
                                //strLink = "<a href='#' onclick='window.open(&quot;{1}?PROG_ID={2}&GUID={5}{6}&quot;, &quot;SMAS_MAIN&quot;, &quot;, top=0, left=0, menubar=0, location=0, resizable=1, status=1&quot;)'>"
                                strLink = "<a href=\'#\' onclick=\'window.open(&quot;{1}?TYPE=b2b&PROG_ID={2}&GUID={5}{6}&quot;, &quot;SMAS_MAIN&quot;, &quot;, top=0, left=0, menubar=0, location=0, resizable=1, status=1&quot;)\'>";
                            }

                            menu.Rows.Add(new HtmlTableRow());
                            menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                            menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'> " + strLink + "  {4}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, ChildNode.Attributes["name"].Value, ChildNode.Attributes["target"].Value, rm.GetString(ChildNode.Attributes["name"].Value), Guid.NewGuid().ToString(), sb.ToString());

                        }
                    }
                    else
                    {
                        if (OnUser.B2B_FLAG_STATUS != "0")
                        {
                            if (OnUser.B2B_FLAG_STATUS == "1")
                            {

                                strLink = "<a href=\'{1}?PROG_ID={2}&GUID={5}{6}\'>";
                                if (ChildNode.Attributes["target"].Value.ToLower() == "_blank")
                                {
                                    strLink = "<a href=\'#\' onclick=\'window.open(&quot;{1}?PROG_ID={2}&GUID={5}{6}&quot;, &quot;SMAS_MAIN&quot;, &quot;top=0, left=0, menubar=0, location=0, resizable=1, status=1&quot;)\'>";
                                }

                                if (ChildNode.Attributes["name"].Value == "VNDW0030")
                                {
                                    menu.Rows.Add(new HtmlTableRow());
                                    menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                                    menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  " + strLink + "  {4}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, ChildNode.Attributes["name"].Value, ChildNode.Attributes["target"].Value, rm.GetString(ChildNode.Attributes["name"].Value), Guid.NewGuid().ToString(), sb.ToString());
                                }
                            }
                            else if (int.Parse(OnUser.B2B_FLAG_STATUS) >= 2)
                            {

                                if (ChildNode.Attributes["name"].Value == "VNDW0030" || ChildNode.Attributes["name"].Value == "DOWNLOADAP" || ChildNode.Attributes["name"].Value == "DOWNLOADCONTENTSOP")
                                {
                                    if (ChildNode.Attributes["name"].Value == "DOWNLOADAP")
                                    {
                                        menu.Rows.Add(new HtmlTableRow());
                                        menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                                        menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  <a href= \"javascript: DownLoadFile(\'{1}?VENDOR_TYPE={2}{4}\')\" >  {3}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, OnUser.VENDOR_TYPE, rm.GetString(System.Convert.ToString(ChildNode.Attributes["name"].Value)), sb.ToString());
                                    }
                                    else if (ChildNode.Attributes["name"].Value == "DOWNLOADCONTENTSOP")
                                    {
                                        menu.Rows.Add(new HtmlTableRow());
                                        menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                                        menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  <a href= \"javascript: DownLoadFile(\'{1}?VENDOR_TYPE={2}{4}\')\" >  {3}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, OnUser.VENDOR_TYPE, rm.GetString(ChildNode.Attributes["name"].Value), sb.ToString());
                                    }
                                    else
                                    {

                                        strLink = "<a href=\'{1}?PROG_ID={2}&GUID={5}{6}\'>";
                                        if (ChildNode.Attributes["target"].Value.ToLower() == "_blank")
                                        {
                                            strLink = "<a href=\'#\' onclick=\'window.open(&quot;{1}?PROG_ID={2}&GUID={5}{6}&quot;, &quot;SMAS_MAIN, &quot;top=0, left=0, menubar=0, location=0, resizable=1, status=1&quot;)\'>";
                                        }

                                        menu.Rows.Add(new HtmlTableRow());
                                        menu.Rows[menu.Rows.Count - 1].Cells.Add(td);
                                        menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  " + strLink + "  {4}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, ChildNode.Attributes["name"].Value, ChildNode.Attributes["target"].Value, rm.GetString(ChildNode.Attributes["name"].Value), Guid.NewGuid().ToString(), sb.ToString());
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    // Clare mark for IE7 test
                    //      menu.Rows(menu.Rows.Count - 1).Cells(menu.Rows(menu.Rows.Count - 1).Cells.Count - 1).InnerHtml() = String.Format("<img src='{0}'>  <base target='{3}'>  <a href='{1}?TYPE=b2b&GUID={2}&USER={5}'>  {4}</a>", ChildNode.Attributes("imageUrl").Value, ChildNode.Attributes("url").Value, Guid.NewGuid.ToString(), ChildNode.Attributes("target").Value, rm.GetString(ChildNode.Attributes("name").Value), OnUser.VENDOR_NO)
                    menu.Rows.Add(new HtmlTableRow());
                    menu.Rows[menu.Rows.Count - 1].Cells.Add(td);

                    strLink = "<a href=\'{1}?TYPE=b2b&PROG_ID={2}&GUID={3}&USER={4}{7}\'>";
                    if (ChildNode.Attributes["target"].Value.ToLower() == "_blank")
                    {
                        strLink = "<a href=\'#\' onclick=\'window.open(&quot;{1}?TYPE=b2b&PROG_ID={2}&GUID={3}&USER={4}{7}&quot;, &quot;SMAS_MAIN&quot;, &quot;top=0, left=0, menubar=0, location=0, resizable=1, status=1&quot;);\'>";
                    }

                    //menu.Rows(menu.Rows.Count - 1).Cells(menu.Rows(menu.Rows.Count - 1).Cells.Count - 1).InnerHtml() = String.Format("<img src='{0}'>  <a href='{1}?TYPE=b2b&GUID={2}&USER={5}' target='{3}'>  {4}</a>", ChildNode.Attributes("imageUrl").Value, ChildNode.Attributes("url").Value, Guid.NewGuid.ToString(), ChildNode.Attributes("target").Value, rm.GetString(ChildNode.Attributes("name").Value), OnUser.VENDOR_NO)
                    menu.Rows[menu.Rows.Count - 1].Cells[menu.Rows[menu.Rows.Count - 1].Cells.Count - 1].InnerHtml = string.Format("<img src=\'{0}\'>  " + strLink + "  {6}</a>", ChildNode.Attributes["imageUrl"].Value, ChildNode.Attributes["url"].Value, ChildNode.Attributes["name"].Value, Guid.NewGuid().ToString(), OnUser.VENDOR_NO, ChildNode.Attributes["target"].Value, rm.GetString(ChildNode.Attributes["name"].Value), sb.ToString());

                }

            }
        }
    }

}
